package com.sanyang.lawyer.service.adm;

import com.sanyang.lawyer.entity.Adm_Notice;
import com.sanyang.lawyer.mapper.adm.AdmNoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @program: lawyer
 * @description: 行政通知公告Serivce层
 * @author: Mr.Wang
 * @create: 2019-10-21 15:58
 **/

@Service
public class AdmNoticeService {

    @Autowired
    private AdmNoticeMapper admNoticeMapper;

    //显示全部
    public List<Adm_Notice> listall(int id){
        return admNoticeMapper.listall(id);
    }

    public List<Adm_Notice> listallcelc(){
        return admNoticeMapper.listallcelc();
    }

    public void deletenotice(int noticeId){
        this.admNoticeMapper.deletenotice(noticeId);
    }

    //根据id查询一条
    public Adm_Notice getbyid(int noticeId){
        return admNoticeMapper.getbyid(noticeId);
    }

    //模糊查询
    public List<Adm_Notice> fuzzyquery(Map<String,String> map){
        return admNoticeMapper.fuzzyquery(map);
    }

    public void insert(Adm_Notice admNotice){
        this.insert(admNotice);
    }

    public void update(Adm_Notice admNotice) {
        this.update(admNotice);
    }
//    public void update(Adm_Notice admNotice){
//        this.admNoticeMapper.update(admNotice);
//    }
//
//    public void insert(Adm_Notice admNotice){
//        this.admNoticeMapper.insert(admNotice);
//    }
}
